import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;

public class tets {
    public static void main(String[] args) throws Exception {
        Class.forName("com.mysql.jdbc.Driver");
        Connection conn = DriverManager.getConnection("jdbc:mysql://master:3306/sheep", "root", "123456");
        String sql = "select * from emp";
        PreparedStatement ps = conn.prepareStatement(sql);
        ResultSet resultSet= ps.executeQuery();
        while (resultSet.next()){

            System.out.println(resultSet.getString("JOB"));
        }
        resultSet.close();
        ps.close();
        conn.close();
        System.out.println("helloworld");
    }
}

